package com.bing.sina;

import com.bing.Sina;

import javax.swing.*;

/**
 * Created by Administrator on 2014/7/3.
 */
public class TaoListener {
    private JButton shua;
    private JLabel status;
    private JFrame jFrame;

    public TaoListener(JButton shua, JLabel status, JFrame jFrame) {
        this.shua = shua;
        this.status = status;
        this.jFrame = jFrame;
    }

    public void disableShua(String title) {
        shua.setEnabled(false);
        shua.setText(title);
    }

    public void enableShua(String title) {
        shua.setText(title);
        shua.setEnabled(true);
    }

    public void setTitle(String title) {
        jFrame.setTitle(Sina.TITLE + title);
    }

    public void setStatus(String title) {
        status.setText(title);
    }
}
